package task10;

/**
 * @author: pyt
 * @date: 3/21/0021 19:37
 * @description：
 */
public class Test_Bank {

    public static void main(String[] args) {
        ConsBank bank1 = new ConsBank(8000, 0.29, 5.236);
        double interest1 = bank1.compuInterest();   //调用compuInterest()方法，将结果赋值给interest1
         //多态：继承关系：重写：对象是父类，构造方法是子类
        Bank bank100=new ConsBank(8000,0.29,5.236);

        WZBank bank2 = new WZBank(8000, 0.29, 5.236);
        double interest2 =bank2.compuInterest();   //调用compuInterest()方法，将结果赋值给interest2
        double a = interest2 - interest1;
        System.out.println("两个银行利息相差：" + a);
    }
}